﻿@using Board.Models
@{
    ViewBag.Title = "Modify";
}

@section styles
{
    <style>
        .content-wrapper{
            max-width: inherit;
        }
    </style>
}

@if (ViewBag.Moms != null)
{
    List<v_KardexMom> moms = ViewBag.Moms;
    v_KardexMom mom = moms.FirstOrDefault();
    <text>
        @using (Html.BeginForm("SaveKardex", "Kardex", FormMethod.Post, new {id = "KardexForm"}))
        {
            <text>
                
                <div class="clear">@*patient basic*@
                    <div class="float-left margin3-10">Room #: @mom.UnitID-@mom.Bed</div>
                    <div class="float-left margin3-10">Mother's Name: @mom.MomFirstName @mom.MomLastName</div>
                    <div class="float-left margin3-10">Age: @(mom.MomDateofBirth.HasValue ? (DateTime.Now - mom.MomDateofBirth.Value).Days/365 + "" : "")</div>
                    <div class="float-left margin3-10">Obs: @mom.MomacphysDescription </div>
                    <div class="float-left margin3-10">City: @(string.IsNullOrEmpty(mom.MomInstFrom) ? "" : mom.MomInstFrom.Replace("^", ", "))</div>
                    <div class="float-left">RN: @Html.TextBox("RN", mom.MomRN, new {@class="width200"})</div>
                </div>
                
                <div class="clear">@*first row*@
                    
                    <div class="float-left">@*Allergies*@
                        <fieldset class="kardex-fieldset">
                            <legend>Allergies</legend>
                            @Html.RadioButton("MomAllergies", "NKA", !string.IsNullOrEmpty(mom.MomAllergies) && "NKA".Equals(mom.MomAllergies), new {id = "MomAllergiesNKA"})
                            <label for="MomAllergiesNKA">NKA</label><br/>
                            @Html.RadioButton("MomAllergies", "Yes", !string.IsNullOrEmpty(mom.MomAllergies)&& !"NKA".Equals(mom.MomAllergies), new {id = "MomAllergiesYes"})
                            <label for="MomAllergiesYes">Yes, specify(<500 characters)</label><br/>
                            <div id="MomAllergiesContentDiv">
                                @Html.TextArea("MomAllergiesContent", (string.IsNullOrEmpty(mom.MomAllergies) ? "" : mom.MomAllergies), 2, 0, new {style = "width:180px;"})
                            </div>
                        </fieldset>
                    </div>
                    
                    <div class="float-left">@*Delivery*@
                        <fieldset class="kardex-fieldset">
                            <legend>Delivery</legend>
                            <div class="float-left">
                                <label>G/P: </label>@Html.TextBox("DeliveryGP", mom.DeliveryGP + "", new{@class="margin2"})<br/>
                                <label>Date: </label>@Html.TextBox("DeliveryDate", mom.DeliveryDate.HasValue ? mom.DeliveryDate.Value.ToString("f") : "", new {@class = "datetime-picker margin2"})<br/>
                                <label>PPD: </label>@Html.TextBox("DeliveryPPD", mom.DeliveryPPD, new{@class="margin2"})<br/>
                            </div>
                            <div class="float-left">
                                <div class="float-left">
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_SVD, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_SVD))
                                    <label for="SVD">SVD</label>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_Elect_CS, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_Elect_CS))
                                    <label for="SVD">Emerg C/S</label><br/>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_Vac, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_Vac))
                                    <label for="SVD">Vac</label>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_RA, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_RA))
                                    <label for="SVD">R/A</label><br/>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_Forceps, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_Forceps))
                                    <label for="SVD">Forceps</label>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_Other, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_Other))
                                    <label for="SVD">Other</label><br/>
                                    @Html.CheckBox(Tools.DELIVERY_OTHER_Elect_CS, !string.IsNullOrEmpty(mom.DeliveryOther) && mom.DeliveryOther.Contains(Tools.DELIVERY_OTHER_Elect_CS))
                                    <label for="SVD">Elect C/S</label>
                                </div>
                            </div>
                        </fieldset>

                    </div>
                    
                    <div class="float-left">@*LC*@
                        <fieldset class="kardex-fieldset">
                            <legend>LC</legend>
                            @Html.RadioButton("LC", "YesSeen", !string.IsNullOrEmpty(mom.LC) && mom.LC.Equals("YesSeen"), new {id = "LCYesSeen"})
                            <label for="LCYesSeen">Yes-Seen</label><br/>
                            @Html.RadioButton("LC", "YesNotSeen", !string.IsNullOrEmpty(mom.LC) && mom.LC.Equals("YesNotSeen"), new {id = "LCYesNotSeen"})
                            <label for="LCYesNotSeen">Yes-Not Seen</label><br/>
                            @Html.RadioButton("LC", "No", !string.IsNullOrEmpty(mom.LC) && mom.LC.Equals("No"), new {id = "LCNo"})
                            <label for="LCNo">No</label><br/>
                        </fieldset>
                    </div>
                    
                    <div class="float-left">@*Social Work*@
                        <fieldset class="kardex-fieldset">
                            <legend>Social Work</legend>
                            @Html.RadioButton("MomSocialWork", "YesSeen", !string.IsNullOrEmpty(mom.MomSocialWork) && mom.MomSocialWork.Equals("YesSeen"), new {id = "MomSocialWorkYesSeen"})
                            <label for="MomSocialWorkYesSeen">Yes-Seen</label><br/>
                            @Html.RadioButton("MomSocialWork", "YesNotSeen", !string.IsNullOrEmpty(mom.MomSocialWork) && mom.MomSocialWork.Equals("YesNotSeen"), new {id = "MomSocialWorkYesNotSeen"})
                            <label for="MomSocialWorkYesNotSeen">Yes-Not Seen</label><br/>
                            @Html.RadioButton("MomSocialWork", "No", !string.IsNullOrEmpty(mom.MomSocialWork) && mom.MomSocialWork.Equals("No"), new {id = "MomSocialWorkNo"})
                            <label for="MomSocialWorkNo">No</label><br/>
                        </fieldset>
                    </div>
                    
                    <div class="float-left">@*D/C*@
                        <fieldset class="kardex-fieldset">
                            <legend>D/C</legend>
                            @Html.RadioButton("MomDCType", "NotExpected", !string.IsNullOrEmpty(mom.MomDischargeType) && mom.MomDischargeType.Equals("NotExpected"), new {id = "MomDCTypeNotExpected"})
                            <label for="MomDCTypeNotExpected">Not expected</label><br/>
                            @Html.RadioButton("MomDCType", "Today", !string.IsNullOrEmpty(mom.MomDischargeType) && mom.MomDischargeType.Equals("Today"), new {id = "MomDCTypeToday"})
                            <label for="MomDCTypeToday">Today</label><br/>
                            @Html.RadioButton("MomDCType", "DC", !string.IsNullOrEmpty(mom.MomDischargeType) && mom.MomDischargeType.Equals("DC"), new {id = "MomDCTypeDC"})
                            <label for="MomDCTypeDC">? D/C</label><br/>
                        </fieldset>
                    </div>
                </div>


                
                <div class="clear">@*second row*@
                    
                </div>


            </text>
        }
    </text>
}
